package com.byxy.shop.controller.admin;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("/admin")
public class AdminController {
	
	@GetMapping({"","/","/index","index.html"})
	public String index(Model model) {
		model.addAttribute("path", "index");
		model.addAttribute("blogCount", 0);
		model.addAttribute("linkCount", 0);
		model.addAttribute("tagCount", 0);
		model.addAttribute("commentCount", 0);
		model.addAttribute("path", "index");
		return "admin/index";
	}
	
	@GetMapping({"/login"})
    public String login() {
        return "admin/login";
    }

    @GetMapping({"/test"})
    public String test() {
        return "admin/test";
    }
	
}
